import {cache} from '@/utils/CacheUtils'

const USER_TOKEN_KEY = 'user_token';

function save(user) {
    return cache.set(USER_TOKEN_KEY, user, false, 24 * 3600);
}

function token() {
    return cache.get(USER_TOKEN_KEY);
}

function clear() {
    return cache.clear(USER_TOKEN_KEY);
}


export default {
    save, token, clear
}

